﻿/**
 * 
 * Copyright 2009, 2010 Mike Jamer [email: mikejamer@gmail.com ]
 * 
 * This File is part of Moose IRC
 * 
 * MooseIRC is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * MooseIRC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MooseIRC.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
 
using System;
using System.Drawing;
using System.Windows.Forms;
using moose.irc;

namespace mooseirc
{
	/// <summary>
	/// Channel Form handles channels
	/// </summary>
	public partial class ChannelForm 
		: Form
	{
		
		#region [Local Attributes]
		
		/// <summary>
		/// Reference to the channel we're wrapping
		/// </summary>
		private IrcChannel m_channel;
		
		#endregion
		
		#region [Construction]
		
		/// <summary>
		/// Initialize IRC Channel Form
		/// </summary>
		/// <param name="channel">the channel this form is bound to...</param>
		public ChannelForm(IrcChannel channel)
		{
			InitializeComponent();
			m_channel = channel;
			
			return;
		}
		
		#endregion
	
		#region [Helper Methods]
		
		/// <summary>
		/// Update the users
		/// </summary>
		public void update_users() {
			//TODO: update nicklist
			
			return;
		}
		
		/// <summary>
		/// Write message to output
		/// </summary>
		/// <param name="source">the source of the message</param>
		/// <param name="message">the message itself</param>
		public void write_output(string source, string message) {			
			output.write("[" + DateTime.Now.ToShortTimeString() +  "] <" + source + ">" + " " + message);
			return;
		}
		
		#endregion
		
	}
}
